<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>etc.gamma</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "etc.gamma";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/etc.gamma.html" class="symbol">etc.gamma</a></h1>
  
<dl>
<dt class="decl">real <a class="symbol _variable" name="SQRT2PI" href="./htmlsrc/etc.gamma.html#L18" kind="variable" beg="18" end="18">SQRT2PI</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#SQRT2PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L18">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _variable" name="MAXGAMMA" href="./htmlsrc/etc.gamma.html#L19" kind="variable" beg="19" end="19">MAXGAMMA</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#MAXGAMMA" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L19">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real GammaNumeratorCoeffs[] <a class="symbol _variable" name="GammaNumeratorCoeffs" href="./htmlsrc/etc.gamma.html#L23" kind="variable" beg="23" end="32">GammaNumeratorCoeffs</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#GammaNumeratorCoeffs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L23">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real GammaDenominatorCoeffs[] <a class="symbol _variable" name="GammaDenominatorCoeffs" href="./htmlsrc/etc.gamma.html#L34" kind="variable" beg="34" end="44">GammaDenominatorCoeffs</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#GammaDenominatorCoeffs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L34">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real GammaSmallCoeffs[] <a class="symbol _variable" name="GammaSmallCoeffs" href="./htmlsrc/etc.gamma.html#L46" kind="variable" beg="46" end="56">GammaSmallCoeffs</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#GammaSmallCoeffs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L46">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real GammaSmallNegCoeffs[] <a class="symbol _variable" name="GammaSmallNegCoeffs" href="./htmlsrc/etc.gamma.html#L58" kind="variable" beg="58" end="68">GammaSmallNegCoeffs</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#GammaSmallNegCoeffs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L58">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real logGammaStirlingCoeffs[] <a class="symbol _variable" name="logGammaStirlingCoeffs" href="./htmlsrc/etc.gamma.html#L70" kind="variable" beg="70" end="78">logGammaStirlingCoeffs</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#logGammaStirlingCoeffs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L70">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real logGammaNumerator[] <a class="symbol _variable" name="logGammaNumerator" href="./htmlsrc/etc.gamma.html#L80" kind="variable" beg="80" end="88">logGammaNumerator</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#logGammaNumerator" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L80">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real logGammaDenominator[] <a class="symbol _variable" name="logGammaDenominator" href="./htmlsrc/etc.gamma.html#L90" kind="variable" beg="90" end="99">logGammaDenominator</a>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#logGammaDenominator" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L90">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="gammaStirling" href="./htmlsrc/etc.gamma.html#L109" kind="function" beg="109" end="150">gammaStirling</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#gammaStirling" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L109">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="tgamma" href="./htmlsrc/etc.gamma.html#L178" kind="function" beg="178" end="275">tgamma</a><span class="params">(real <em>x</em>)</span>; <a title="Permalink to this symbol" href="#tgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L178">#</a></dt>
<dd class="ddef">
<div class="summary">The Gamma function, &#915;(x)</div>
Generalizes the factorial function to real and complex numbers.
  Like x!, &#915;(x+1) = x*&#915;(x).
<p class="bl"/>
  Mathematically, if z.re &gt; 0 then
   &#915;(z) =<big>&#8747;<sub>0</sub><sup>&infin</sup></big>t<sup>z-1</sup>e<sup>-t</sup>dt
<p class="bl"/>
  This function is equivalent to tgamma() in the C programming language.
<p class="bl"/>
        <table border=1 cellpadding=4 cellspacing=0>
        <caption>Special Values</caption>
        <tr> <th> x               <th> &#915;(x)   <th>invalid?
        <tr> <td> NAN             <td> NAN           <td> yes
        <tr> <td> &plusmn;0.0     <td> &plusmn;&infin;      <td> yes
        <tr> <td> integer &gt; 0     <td> (x-1)!        <td> no
        <tr> <td> integer &lt; 0     <td> NAN           <td> yes
        <tr> <td> +&infin;        <td> +&infin;      <td> no
        <tr> <td> -&infin;        <td> NAN           <td> yes
        </table>
<p class="sec_header">References:</p>cephes, http://en.wikipedia.org/wiki/Gamma_function</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/etc.gamma.html#L277" kind="unittest" beg="277" end="299">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L277">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="lgamma" href="./htmlsrc/etc.gamma.html#L319" kind="function" beg="319" end="412">lgamma</a><span class="params">(real <em>x</em>)</span>; <a title="Permalink to this symbol" href="#lgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L319">#</a></dt>
<dd class="ddef">
<div class="summary">Natural logarithm of gamma function.</div>
Returns the base e (2.718...) logarithm of the absolute
 value of the gamma function of the argument.
<p class="bl"/>
 For reals, lgamma is equivalent to log(fabs(tgamma(x)).
<p class="bl"/>
        <table border=1 cellpadding=4 cellspacing=0>
        <caption>Special Values</caption>
        <tr> <th> x               <th> log&#915;(x) <th>invalid?
        <tr> <td> NaN             <td> NaN           <td> yes
        <tr> <td> integer &lt;= 0    <td> +&infin;      <td> yes
        <tr> <td> 1, 2            <td> +0.0          <td> no
        <tr> <td> &plusmn;&infin;  <td> +&infin;      <td> no
        </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/etc.gamma.html#L414" kind="unittest" beg="414" end="481">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/etc.gamma.html#L414">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:32 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>